doctype html
html
  head
    title= title
    script(src='javascripts/glofunc.js', type='text/javascript')
    script(src="//code.jquery.com/jquery-1.11.3.min.js")
    link(rel='stylesheet' href='/stylesheets/style.css')
  body(style = "margin: 0; padding: 0")
    div(id="mask")
    include popup.pug

    link(rel='stylesheet' href='/stylesheets/navbar.css')
    link(rel='stylesheet' href='/stylesheets/box.css')
    div(class='border')
      div(class='nav-bar')
        div(class='nav-list')
          -  
            var list = [{name:'首页',router:'/index'}, {name:'推荐',router:'/recommend'}, 
              {name:'分类',router:'/tags?tags=1'}, {name:'搜索',router:'/search'},
              {name:'收藏',router:'/collection'},] 
              //- {name:'评分',router:'/rank'}
          each item in list
            if nav == item.name
              span(class='nav-selected')
                a(href=item.router)= item.name
            else
              span
                a(href=item.router)= item.name
        div(class='nav-person')
          -
          if login
            span(class='login') 
              a(class='login',href='/user/details') 用户：#{username}
          else
            span(class='nav-selected')
              a(href='/user/login') 登录
            span 
              a(href='/user/register') 注册
    block content